/*
 * @(#)CMPPProtocolCodecFactory.java 1.0 2013-6-26
 *
 * Copyright (c) 2009 Sunyard System Engineering Co., Ltd. All rights reserved.
 *
 * This software is the confidential and proprietary information of Sunyard
 * System Engineering Co., Ltd. ("Confidential Information"). You shall not
 * disclose such Confidential Information and shall use it only in accordance
 * with the terms of the license agreement you entered into with Sunyard.
 */
/*
 * Modification History: Date Author Version Description
 * ------------------------------------------------------------------
 *
 */

package vsmg.cmpp.codec;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

/**
 *
 *
 * @version 1.0 2013-6-26
 * @author xinx.wang@sunyard.com
 */
public class CMPPProtocolCodecFactory implements ProtocolCodecFactory {
	private ProtocolDecoder	decoder	= null;

	private ProtocolEncoder	encoder	= null;

	public CMPPProtocolCodecFactory(ProtocolEncoder encoder, ProtocolDecoder decoder) {

		this.decoder = decoder;
		this.encoder = encoder;
	}

	@Override
	public ProtocolDecoder getDecoder(IoSession arg0) throws Exception {
		return this.decoder;
	}

	@Override
	public ProtocolEncoder getEncoder(IoSession arg0) throws Exception {
		return this.encoder;
	}

}
